package com.example.zzl.view.fragment.UserFragment;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ListView;

/**
 * Created by Administrator on 2017/2/12.
 */

public class Mylist extends ListView {
    public Mylist(Context context) {
        super(context);
    }

    public Mylist(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public Mylist(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec=MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE>>2,MeasureSpec.AT_MOST);

        int hightSpec2= MeasureSpec.makeMeasureSpec(getResources().getDisplayMetrics().heightPixels, MeasureSpec.AT_MOST);
        //测量
        super.onMeasure(widthMeasureSpec, hightSpec2);
    }
}
